package com.piece.blog.model;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * 试卷信息 training_exam_info
 *
 * @author onepiece
 * @date 2023-09-12
 */
@Data
@NoArgsConstructor
@Entity
@Table(name = "training_exam_info")
@ApiModel(value = "试卷信息")
public class TrainingExamInfo implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "exam_id", length = 11)
    @ApiModelProperty(value = "试卷ID")
    private Long examId;

    @Column(name = "course_id")
    @ApiModelProperty(value = "课程ID")
    private Long courseId;

    @Column(name = "title")
    @ApiModelProperty(value = "考试标题")
    private String title;

    @Column(name = "introduce")
    @ApiModelProperty(value = "考试介绍")
    private String introduce;

    @Column(name = "question_disorder")
    @ApiModelProperty(value = "题目乱序,0:是 1:否")
    private String questionDisorder;

    @Column(name = "option_disorder")
    @ApiModelProperty(value = "选项乱序,0:是 1:否")
    private String optionDisorder;

    @Column(name = "start_time")
    @ApiModelProperty(value = "开始时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    @Column(name = "end_time")
    @ApiModelProperty(value = "结束时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    @Column(name = "is_monitor")
    @ApiModelProperty(value = "是否开启行为监控,0:是 1:否")
    private String isMonitor;

    @Column(name = "is_copy_paste")
    @ApiModelProperty(value = "是否允许复制,0:是 1:否")
    private String isCopyPaste;

    @Column(name = "create_by")
    @ApiModelProperty(value = "创建人ID")
    private Long createBy;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

}
